package com.tupu.mapper.dispatch;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tupu.entity.dispatch.DispatchOperTicketPerformMsg;
import org.apache.ibatis.annotations.Select;

public interface DispatchOperTicketPerformMsgMapper extends BaseMapper<DispatchOperTicketPerformMsg> {

    //上移查询
    @Select("select msg.node_num from tb_dispatch_operTicketPerformMsg msg where node_num < #{node_num} order by node_num desc limit 0,1")
    Integer findPreviousNodeNum(Integer node_num);

    //下移查询
    @Select("select msg.node_num from tb_dispatch_operTicketPerformMsg msg where node_num > #{node_num} order by node_num asc limit 0,1")
    Integer findNextNodeNum(Integer node_num);
}
